{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import json\n",
    "import pandas as pd\n",
    "\n",
    "tweets_data = []\n",
    "# Open connection to file\n",
    "h=open('data/output/sauditweets.txt','r')\n",
    "\n",
    "# Read in tweets and store in list: tweets_data\n",
    "for i in h:\n",
    "    try:\n",
    "        tmp=json.loads(i)\n",
    "        tweets_data.append(tmp)\n",
    "    except:\n",
    "        print('X'), #shows lines with errors\n",
    "h.close()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>created_at</th>\n",
       "      <th>id</th>\n",
       "      <th>id_str</th>\n",
       "      <th>text</th>\n",
       "      <th>source</th>\n",
       "      <th>truncated</th>\n",
       "      <th>in_reply_to_status_id</th>\n",
       "      <th>in_reply_to_status_id_str</th>\n",
       "      <th>in_reply_to_user_id</th>\n",
       "      <th>in_reply_to_user_id_str</th>\n",
       "      <th>...</th>\n",
       "      <th>lang</th>\n",
       "      <th>timestamp_ms</th>\n",
       "      <th>display_text_range</th>\n",
       "      <th>extended_entities</th>\n",
       "      <th>possibly_sensitive</th>\n",
       "      <th>extended_tweet</th>\n",
       "      <th>quoted_status_id</th>\n",
       "      <th>quoted_status_id_str</th>\n",
       "      <th>quoted_status</th>\n",
       "      <th>quoted_status_permalink</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Tue Sep 29 14:49:06 +0000 2020</td>\n",
       "      <td>1310954762666487810</td>\n",
       "      <td>1310954762666487810</td>\n",
       "      <td>راح العود اللي خالي من العذاريب \\nاللي يمناه م...</td>\n",
       "      <td>&lt;a href=\"http://twitter.com/download/iphone\" r...</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>...</td>\n",
       "      <td>ar</td>\n",
       "      <td>1601390946438</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Tue Sep 29 14:49:07 +0000 2020</td>\n",
       "      <td>1310954767032766465</td>\n",
       "      <td>1310954767032766465</td>\n",
       "      <td>#الشيخ_صباح_الاحمد_الصباح https://t.co/nAF4xDL5a4</td>\n",
       "      <td>&lt;a href=\"http://twitter.com/download/iphone\" r...</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>...</td>\n",
       "      <td>und</td>\n",
       "      <td>1601390947479</td>\n",
       "      <td>[0, 25]</td>\n",
       "      <td>{'media': [{'id': 1310954760749678597, 'id_str...</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Tue Sep 29 14:49:07 +0000 2020</td>\n",
       "      <td>1310954768693628929</td>\n",
       "      <td>1310954768693628929</td>\n",
       "      <td>انا لله وأنا اليه راجعون ، نعزي انفسنا ونعزي ا...</td>\n",
       "      <td>&lt;a href=\"http://twitter.com/download/iphone\" r...</td>\n",
       "      <td>True</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>...</td>\n",
       "      <td>ar</td>\n",
       "      <td>1601390947875</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>{'full_text': 'انا لله وأنا اليه راجعون ، نعزي...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Tue Sep 29 14:49:08 +0000 2020</td>\n",
       "      <td>1310954769255731205</td>\n",
       "      <td>1310954769255731205</td>\n",
       "      <td>@Rokkaya89 عبالك تاتو رباني شبي حظي 😭</td>\n",
       "      <td>&lt;a href=\"http://twitter.com/download/iphone\" r...</td>\n",
       "      <td>False</td>\n",
       "      <td>1.310955e+18</td>\n",
       "      <td>1310954638380761090</td>\n",
       "      <td>2.363014e+09</td>\n",
       "      <td>2363014047</td>\n",
       "      <td>...</td>\n",
       "      <td>ar</td>\n",
       "      <td>1601390948009</td>\n",
       "      <td>[11, 37]</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Tue Sep 29 14:49:07 +0000 2020</td>\n",
       "      <td>1310954769196945413</td>\n",
       "      <td>1310954769196945413</td>\n",
       "      <td>وها قد غابت شمس الكويت , \\nاللهم أجرنا في مصيب...</td>\n",
       "      <td>&lt;a href=\"http://twitter.com/download/iphone\" r...</td>\n",
       "      <td>True</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>...</td>\n",
       "      <td>ar</td>\n",
       "      <td>1601390947995</td>\n",
       "      <td>[0, 140]</td>\n",
       "      <td>NaN</td>\n",
       "      <td>False</td>\n",
       "      <td>{'full_text': 'وها قد غابت شمس الكويت , \n",
       "اللهم...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99993</th>\n",
       "      <td>Wed Sep 30 09:42:57 +0000 2020</td>\n",
       "      <td>1311240107593281536</td>\n",
       "      <td>1311240107593281536</td>\n",
       "      <td>كنت أتساءل \\nلماذا يختار الموت أفضل من فينا؟ \\...</td>\n",
       "      <td>&lt;a href=\"http://twitter.com/download/iphone\" r...</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>...</td>\n",
       "      <td>ar</td>\n",
       "      <td>1601458977970</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99994</th>\n",
       "      <td>Wed Sep 30 09:42:58 +0000 2020</td>\n",
       "      <td>1311240108331470848</td>\n",
       "      <td>1311240108331470848</td>\n",
       "      <td>@becktalia הגזמת</td>\n",
       "      <td>&lt;a href=\"http://twitter.com/download/iphone\" r...</td>\n",
       "      <td>False</td>\n",
       "      <td>1.311240e+18</td>\n",
       "      <td>1311239747797487617</td>\n",
       "      <td>2.701762e+09</td>\n",
       "      <td>2701761817</td>\n",
       "      <td>...</td>\n",
       "      <td>iw</td>\n",
       "      <td>1601458978146</td>\n",
       "      <td>[11, 16]</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99995</th>\n",
       "      <td>Wed Sep 30 09:42:58 +0000 2020</td>\n",
       "      <td>1311240111024148481</td>\n",
       "      <td>1311240111024148481</td>\n",
       "      <td>@i7arth @LxRY_7 @Count__Vampire مسكين خلود ساك...</td>\n",
       "      <td>&lt;a href=\"http://twitter.com/download/iphone\" r...</td>\n",
       "      <td>False</td>\n",
       "      <td>1.311240e+18</td>\n",
       "      <td>1311239939934351360</td>\n",
       "      <td>1.082444e+09</td>\n",
       "      <td>1082444168</td>\n",
       "      <td>...</td>\n",
       "      <td>ar</td>\n",
       "      <td>1601458978788</td>\n",
       "      <td>[32, 60]</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99996</th>\n",
       "      <td>Wed Sep 30 09:42:59 +0000 2020</td>\n",
       "      <td>1311240113389789184</td>\n",
       "      <td>1311240113389789184</td>\n",
       "      <td>من الطبيعي أن نختلف ونعتذر .. \\nونعاتب ..  \\nو...</td>\n",
       "      <td>&lt;a href=\"http://tapbots.com/tweetbot\" rel=\"nof...</td>\n",
       "      <td>True</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>...</td>\n",
       "      <td>ar</td>\n",
       "      <td>1601458979352</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>{'full_text': 'من الطبيعي أن نختلف ونعتذر .. \n",
       "...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99997</th>\n",
       "      <td>Wed Sep 30 09:43:00 +0000 2020</td>\n",
       "      <td>1311240116271222785</td>\n",
       "      <td>1311240116271222785</td>\n",
       "      <td>@maiconroque27 💪🏻 https://t.co/23MmIpb7R2</td>\n",
       "      <td>&lt;a href=\"http://twitter.com/download/iphone\" r...</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>4.144883e+09</td>\n",
       "      <td>4144883333</td>\n",
       "      <td>...</td>\n",
       "      <td>und</td>\n",
       "      <td>1601458980039</td>\n",
       "      <td>[0, 17]</td>\n",
       "      <td>{'media': [{'id': 1311239974000394241, 'id_str...</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>99998 rows × 35 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                           created_at                   id  \\\n",
       "0      Tue Sep 29 14:49:06 +0000 2020  1310954762666487810   \n",
       "1      Tue Sep 29 14:49:07 +0000 2020  1310954767032766465   \n",
       "2      Tue Sep 29 14:49:07 +0000 2020  1310954768693628929   \n",
       "3      Tue Sep 29 14:49:08 +0000 2020  1310954769255731205   \n",
       "4      Tue Sep 29 14:49:07 +0000 2020  1310954769196945413   \n",
       "...                               ...                  ...   \n",
       "99993  Wed Sep 30 09:42:57 +0000 2020  1311240107593281536   \n",
       "99994  Wed Sep 30 09:42:58 +0000 2020  1311240108331470848   \n",
       "99995  Wed Sep 30 09:42:58 +0000 2020  1311240111024148481   \n",
       "99996  Wed Sep 30 09:42:59 +0000 2020  1311240113389789184   \n",
       "99997  Wed Sep 30 09:43:00 +0000 2020  1311240116271222785   \n",
       "\n",
       "                    id_str                                               text  \\\n",
       "0      1310954762666487810  راح العود اللي خالي من العذاريب \\nاللي يمناه م...   \n",
       "1      1310954767032766465  #الشيخ_صباح_الاحمد_الصباح https://t.co/nAF4xDL5a4   \n",
       "2      1310954768693628929  انا لله وأنا اليه راجعون ، نعزي انفسنا ونعزي ا...   \n",
       "3      1310954769255731205              @Rokkaya89 عبالك تاتو رباني شبي حظي 😭   \n",
       "4      1310954769196945413  وها قد غابت شمس الكويت , \\nاللهم أجرنا في مصيب...   \n",
       "...                    ...                                                ...   \n",
       "99993  1311240107593281536  كنت أتساءل \\nلماذا يختار الموت أفضل من فينا؟ \\...   \n",
       "99994  1311240108331470848                                   @becktalia הגזמת   \n",
       "99995  1311240111024148481  @i7arth @LxRY_7 @Count__Vampire مسكين خلود ساك...   \n",
       "99996  1311240113389789184  من الطبيعي أن نختلف ونعتذر .. \\nونعاتب ..  \\nو...   \n",
       "99997  1311240116271222785          @maiconroque27 💪🏻 https://t.co/23MmIpb7R2   \n",
       "\n",
       "                                                  source  truncated  \\\n",
       "0      <a href=\"http://twitter.com/download/iphone\" r...      False   \n",
       "1      <a href=\"http://twitter.com/download/iphone\" r...      False   \n",
       "2      <a href=\"http://twitter.com/download/iphone\" r...       True   \n",
       "3      <a href=\"http://twitter.com/download/iphone\" r...      False   \n",
       "4      <a href=\"http://twitter.com/download/iphone\" r...       True   \n",
       "...                                                  ...        ...   \n",
       "99993  <a href=\"http://twitter.com/download/iphone\" r...      False   \n",
       "99994  <a href=\"http://twitter.com/download/iphone\" r...      False   \n",
       "99995  <a href=\"http://twitter.com/download/iphone\" r...      False   \n",
       "99996  <a href=\"http://tapbots.com/tweetbot\" rel=\"nof...       True   \n",
       "99997  <a href=\"http://twitter.com/download/iphone\" r...      False   \n",
       "\n",
       "       in_reply_to_status_id in_reply_to_status_id_str  in_reply_to_user_id  \\\n",
       "0                        NaN                      None                  NaN   \n",
       "1                        NaN                      None                  NaN   \n",
       "2                        NaN                      None                  NaN   \n",
       "3               1.310955e+18       1310954638380761090         2.363014e+09   \n",
       "4                        NaN                      None                  NaN   \n",
       "...                      ...                       ...                  ...   \n",
       "99993                    NaN                      None                  NaN   \n",
       "99994           1.311240e+18       1311239747797487617         2.701762e+09   \n",
       "99995           1.311240e+18       1311239939934351360         1.082444e+09   \n",
       "99996                    NaN                      None                  NaN   \n",
       "99997                    NaN                      None         4.144883e+09   \n",
       "\n",
       "      in_reply_to_user_id_str  ... lang   timestamp_ms display_text_range  \\\n",
       "0                        None  ...   ar  1601390946438                NaN   \n",
       "1                        None  ...  und  1601390947479            [0, 25]   \n",
       "2                        None  ...   ar  1601390947875                NaN   \n",
       "3                  2363014047  ...   ar  1601390948009           [11, 37]   \n",
       "4                        None  ...   ar  1601390947995           [0, 140]   \n",
       "...                       ...  ...  ...            ...                ...   \n",
       "99993                    None  ...   ar  1601458977970                NaN   \n",
       "99994              2701761817  ...   iw  1601458978146           [11, 16]   \n",
       "99995              1082444168  ...   ar  1601458978788           [32, 60]   \n",
       "99996                    None  ...   ar  1601458979352                NaN   \n",
       "99997              4144883333  ...  und  1601458980039            [0, 17]   \n",
       "\n",
       "                                       extended_entities possibly_sensitive  \\\n",
       "0                                                    NaN                NaN   \n",
       "1      {'media': [{'id': 1310954760749678597, 'id_str...              False   \n",
       "2                                                    NaN                NaN   \n",
       "3                                                    NaN                NaN   \n",
       "4                                                    NaN              False   \n",
       "...                                                  ...                ...   \n",
       "99993                                                NaN                NaN   \n",
       "99994                                                NaN                NaN   \n",
       "99995                                                NaN                NaN   \n",
       "99996                                                NaN                NaN   \n",
       "99997  {'media': [{'id': 1311239974000394241, 'id_str...              False   \n",
       "\n",
       "                                          extended_tweet  quoted_status_id  \\\n",
       "0                                                    NaN               NaN   \n",
       "1                                                    NaN               NaN   \n",
       "2      {'full_text': 'انا لله وأنا اليه راجعون ، نعزي...               NaN   \n",
       "3                                                    NaN               NaN   \n",
       "4      {'full_text': 'وها قد غابت شمس الكويت , \n",
       "اللهم...               NaN   \n",
       "...                                                  ...               ...   \n",
       "99993                                                NaN               NaN   \n",
       "99994                                                NaN               NaN   \n",
       "99995                                                NaN               NaN   \n",
       "99996  {'full_text': 'من الطبيعي أن نختلف ونعتذر .. \n",
       "...               NaN   \n",
       "99997                                                NaN               NaN   \n",
       "\n",
       "       quoted_status_id_str  quoted_status  quoted_status_permalink  \n",
       "0                       NaN            NaN                      NaN  \n",
       "1                       NaN            NaN                      NaN  \n",
       "2                       NaN            NaN                      NaN  \n",
       "3                       NaN            NaN                      NaN  \n",
       "4                       NaN            NaN                      NaN  \n",
       "...                     ...            ...                      ...  \n",
       "99993                   NaN            NaN                      NaN  \n",
       "99994                   NaN            NaN                      NaN  \n",
       "99995                   NaN            NaN                      NaN  \n",
       "99996                   NaN            NaN                      NaN  \n",
       "99997                   NaN            NaN                      NaN  \n",
       "\n",
       "[99998 rows x 35 columns]"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(tweets_data)\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>url</th>\n",
       "      <th>place_type</th>\n",
       "      <th>name</th>\n",
       "      <th>full_name</th>\n",
       "      <th>country_code</th>\n",
       "      <th>country</th>\n",
       "      <th>bounding_box</th>\n",
       "      <th>attributes</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>01bf5c1e56ac186d</td>\n",
       "      <td>https://api.twitter.com/1.1/geo/id/01bf5c1e56a...</td>\n",
       "      <td>city</td>\n",
       "      <td>الرياض</td>\n",
       "      <td>الرياض, المملكة العربية السعودية</td>\n",
       "      <td>SA</td>\n",
       "      <td>المملكة العربية السعودية</td>\n",
       "      <td>{'type': 'Polygon', 'coordinates': [[[46.30439...</td>\n",
       "      <td>{}</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>000799c66e428a87</td>\n",
       "      <td>https://api.twitter.com/1.1/geo/id/000799c66e4...</td>\n",
       "      <td>city</td>\n",
       "      <td>Jeddah</td>\n",
       "      <td>Jeddah, Kingdom of Saudi Arabia</td>\n",
       "      <td>SA</td>\n",
       "      <td>Kingdom of Saudi Arabia</td>\n",
       "      <td>{'type': 'Polygon', 'coordinates': [[[38.92965...</td>\n",
       "      <td>{}</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0033b59d59056043</td>\n",
       "      <td>https://api.twitter.com/1.1/geo/id/0033b59d590...</td>\n",
       "      <td>admin</td>\n",
       "      <td>Al Rayyan</td>\n",
       "      <td>Al Rayyan, Qatar</td>\n",
       "      <td>QA</td>\n",
       "      <td>Qatar</td>\n",
       "      <td>{'type': 'Polygon', 'coordinates': [[[50.75007...</td>\n",
       "      <td>{}</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>b62cd77425868341</td>\n",
       "      <td>https://api.twitter.com/1.1/geo/id/b62cd774258...</td>\n",
       "      <td>country</td>\n",
       "      <td>Iraq</td>\n",
       "      <td>Iraq</td>\n",
       "      <td>IQ</td>\n",
       "      <td>Iraq</td>\n",
       "      <td>{'type': 'Polygon', 'coordinates': [[[38.79470...</td>\n",
       "      <td>{}</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>01609a675eba6f1d</td>\n",
       "      <td>https://api.twitter.com/1.1/geo/id/01609a675eb...</td>\n",
       "      <td>city</td>\n",
       "      <td>Al Surra</td>\n",
       "      <td>Al Surra, Kuwait</td>\n",
       "      <td>KW</td>\n",
       "      <td>Kuwait</td>\n",
       "      <td>{'type': 'Polygon', 'coordinates': [[[47.99377...</td>\n",
       "      <td>{}</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99993</th>\n",
       "      <td>e3e9c55876b99760</td>\n",
       "      <td>https://api.twitter.com/1.1/geo/id/e3e9c55876b...</td>\n",
       "      <td>country</td>\n",
       "      <td>مملكة البحرين</td>\n",
       "      <td>مملكة البحرين</td>\n",
       "      <td>BH</td>\n",
       "      <td>مملكة البحرين</td>\n",
       "      <td>{'type': 'Polygon', 'coordinates': [[[50.32511...</td>\n",
       "      <td>{}</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99994</th>\n",
       "      <td>2edb6e240797c549</td>\n",
       "      <td>https://api.twitter.com/1.1/geo/id/2edb6e24079...</td>\n",
       "      <td>country</td>\n",
       "      <td>Israel</td>\n",
       "      <td>Israel</td>\n",
       "      <td>IL</td>\n",
       "      <td>Israel</td>\n",
       "      <td>{'type': 'Polygon', 'coordinates': [[[34.26692...</td>\n",
       "      <td>{}</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99995</th>\n",
       "      <td>001907e868d06e24</td>\n",
       "      <td>https://api.twitter.com/1.1/geo/id/001907e868d...</td>\n",
       "      <td>admin</td>\n",
       "      <td>Dubai</td>\n",
       "      <td>Dubai, United Arab Emirates</td>\n",
       "      <td>AE</td>\n",
       "      <td>United Arab Emirates</td>\n",
       "      <td>{'type': 'Polygon', 'coordinates': [[[54.89397...</td>\n",
       "      <td>{}</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99996</th>\n",
       "      <td>017189e6700ad6cd</td>\n",
       "      <td>https://api.twitter.com/1.1/geo/id/017189e6700...</td>\n",
       "      <td>city</td>\n",
       "      <td>الاحساء</td>\n",
       "      <td>الاحساء, المملكة العربية السعودية</td>\n",
       "      <td>SA</td>\n",
       "      <td>المملكة العربية السعودية</td>\n",
       "      <td>{'type': 'Polygon', 'coordinates': [[[49.41665...</td>\n",
       "      <td>{}</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99997</th>\n",
       "      <td>01fc978d41e183e7</td>\n",
       "      <td>https://api.twitter.com/1.1/geo/id/01fc978d41e...</td>\n",
       "      <td>admin</td>\n",
       "      <td>جازان</td>\n",
       "      <td>جازان, المملكة العربية السعودية</td>\n",
       "      <td>SA</td>\n",
       "      <td>المملكة العربية السعودية</td>\n",
       "      <td>{'type': 'Polygon', 'coordinates': [[[41.75298...</td>\n",
       "      <td>{}</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>99998 rows × 9 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                     id                                                url  \\\n",
       "0      01bf5c1e56ac186d  https://api.twitter.com/1.1/geo/id/01bf5c1e56a...   \n",
       "1      000799c66e428a87  https://api.twitter.com/1.1/geo/id/000799c66e4...   \n",
       "2      0033b59d59056043  https://api.twitter.com/1.1/geo/id/0033b59d590...   \n",
       "3      b62cd77425868341  https://api.twitter.com/1.1/geo/id/b62cd774258...   \n",
       "4      01609a675eba6f1d  https://api.twitter.com/1.1/geo/id/01609a675eb...   \n",
       "...                 ...                                                ...   \n",
       "99993  e3e9c55876b99760  https://api.twitter.com/1.1/geo/id/e3e9c55876b...   \n",
       "99994  2edb6e240797c549  https://api.twitter.com/1.1/geo/id/2edb6e24079...   \n",
       "99995  001907e868d06e24  https://api.twitter.com/1.1/geo/id/001907e868d...   \n",
       "99996  017189e6700ad6cd  https://api.twitter.com/1.1/geo/id/017189e6700...   \n",
       "99997  01fc978d41e183e7  https://api.twitter.com/1.1/geo/id/01fc978d41e...   \n",
       "\n",
       "      place_type           name                          full_name  \\\n",
       "0           city         الرياض   الرياض, المملكة العربية السعودية   \n",
       "1           city         Jeddah    Jeddah, Kingdom of Saudi Arabia   \n",
       "2          admin      Al Rayyan                   Al Rayyan, Qatar   \n",
       "3        country           Iraq                               Iraq   \n",
       "4           city       Al Surra                   Al Surra, Kuwait   \n",
       "...          ...            ...                                ...   \n",
       "99993    country  مملكة البحرين                      مملكة البحرين   \n",
       "99994    country         Israel                             Israel   \n",
       "99995      admin          Dubai        Dubai, United Arab Emirates   \n",
       "99996       city        الاحساء  الاحساء, المملكة العربية السعودية   \n",
       "99997      admin          جازان    جازان, المملكة العربية السعودية   \n",
       "\n",
       "      country_code                   country  \\\n",
       "0               SA  المملكة العربية السعودية   \n",
       "1               SA   Kingdom of Saudi Arabia   \n",
       "2               QA                     Qatar   \n",
       "3               IQ                      Iraq   \n",
       "4               KW                    Kuwait   \n",
       "...            ...                       ...   \n",
       "99993           BH             مملكة البحرين   \n",
       "99994           IL                    Israel   \n",
       "99995           AE      United Arab Emirates   \n",
       "99996           SA  المملكة العربية السعودية   \n",
       "99997           SA  المملكة العربية السعودية   \n",
       "\n",
       "                                            bounding_box attributes  \n",
       "0      {'type': 'Polygon', 'coordinates': [[[46.30439...         {}  \n",
       "1      {'type': 'Polygon', 'coordinates': [[[38.92965...         {}  \n",
       "2      {'type': 'Polygon', 'coordinates': [[[50.75007...         {}  \n",
       "3      {'type': 'Polygon', 'coordinates': [[[38.79470...         {}  \n",
       "4      {'type': 'Polygon', 'coordinates': [[[47.99377...         {}  \n",
       "...                                                  ...        ...  \n",
       "99993  {'type': 'Polygon', 'coordinates': [[[50.32511...         {}  \n",
       "99994  {'type': 'Polygon', 'coordinates': [[[34.26692...         {}  \n",
       "99995  {'type': 'Polygon', 'coordinates': [[[54.89397...         {}  \n",
       "99996  {'type': 'Polygon', 'coordinates': [[[49.41665...         {}  \n",
       "99997  {'type': 'Polygon', 'coordinates': [[[41.75298...         {}  \n",
       "\n",
       "[99998 rows x 9 columns]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "places = df['place'].apply(pd.Series)\n",
    "places"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>place_id</th>\n",
       "      <th>place_url</th>\n",
       "      <th>place_place_type</th>\n",
       "      <th>place_name</th>\n",
       "      <th>place_full_name</th>\n",
       "      <th>place_country_code</th>\n",
       "      <th>place_country</th>\n",
       "      <th>place_bounding_box</th>\n",
       "      <th>place_attributes</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>01bf5c1e56ac186d</td>\n",
       "      <td>https://api.twitter.com/1.1/geo/id/01bf5c1e56a...</td>\n",
       "      <td>city</td>\n",
       "      <td>الرياض</td>\n",
       "      <td>الرياض, المملكة العربية السعودية</td>\n",
       "      <td>SA</td>\n",
       "      <td>المملكة العربية السعودية</td>\n",
       "      <td>{'type': 'Polygon', 'coordinates': [[[46.30439...</td>\n",
       "      <td>{}</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>000799c66e428a87</td>\n",
       "      <td>https://api.twitter.com/1.1/geo/id/000799c66e4...</td>\n",
       "      <td>city</td>\n",
       "      <td>Jeddah</td>\n",
       "      <td>Jeddah, Kingdom of Saudi Arabia</td>\n",
       "      <td>SA</td>\n",
       "      <td>Kingdom of Saudi Arabia</td>\n",
       "      <td>{'type': 'Polygon', 'coordinates': [[[38.92965...</td>\n",
       "      <td>{}</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0033b59d59056043</td>\n",
       "      <td>https://api.twitter.com/1.1/geo/id/0033b59d590...</td>\n",
       "      <td>admin</td>\n",
       "      <td>Al Rayyan</td>\n",
       "      <td>Al Rayyan, Qatar</td>\n",
       "      <td>QA</td>\n",
       "      <td>Qatar</td>\n",
       "      <td>{'type': 'Polygon', 'coordinates': [[[50.75007...</td>\n",
       "      <td>{}</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>b62cd77425868341</td>\n",
       "      <td>https://api.twitter.com/1.1/geo/id/b62cd774258...</td>\n",
       "      <td>country</td>\n",
       "      <td>Iraq</td>\n",
       "      <td>Iraq</td>\n",
       "      <td>IQ</td>\n",
       "      <td>Iraq</td>\n",
       "      <td>{'type': 'Polygon', 'coordinates': [[[38.79470...</td>\n",
       "      <td>{}</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>01609a675eba6f1d</td>\n",
       "      <td>https://api.twitter.com/1.1/geo/id/01609a675eb...</td>\n",
       "      <td>city</td>\n",
       "      <td>Al Surra</td>\n",
       "      <td>Al Surra, Kuwait</td>\n",
       "      <td>KW</td>\n",
       "      <td>Kuwait</td>\n",
       "      <td>{'type': 'Polygon', 'coordinates': [[[47.99377...</td>\n",
       "      <td>{}</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99993</th>\n",
       "      <td>e3e9c55876b99760</td>\n",
       "      <td>https://api.twitter.com/1.1/geo/id/e3e9c55876b...</td>\n",
       "      <td>country</td>\n",
       "      <td>مملكة البحرين</td>\n",
       "      <td>مملكة البحرين</td>\n",
       "      <td>BH</td>\n",
       "      <td>مملكة البحرين</td>\n",
       "      <td>{'type': 'Polygon', 'coordinates': [[[50.32511...</td>\n",
       "      <td>{}</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99994</th>\n",
       "      <td>2edb6e240797c549</td>\n",
       "      <td>https://api.twitter.com/1.1/geo/id/2edb6e24079...</td>\n",
       "      <td>country</td>\n",
       "      <td>Israel</td>\n",
       "      <td>Israel</td>\n",
       "      <td>IL</td>\n",
       "      <td>Israel</td>\n",
       "      <td>{'type': 'Polygon', 'coordinates': [[[34.26692...</td>\n",
       "      <td>{}</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99995</th>\n",
       "      <td>001907e868d06e24</td>\n",
       "      <td>https://api.twitter.com/1.1/geo/id/001907e868d...</td>\n",
       "      <td>admin</td>\n",
       "      <td>Dubai</td>\n",
       "      <td>Dubai, United Arab Emirates</td>\n",
       "      <td>AE</td>\n",
       "      <td>United Arab Emirates</td>\n",
       "      <td>{'type': 'Polygon', 'coordinates': [[[54.89397...</td>\n",
       "      <td>{}</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99996</th>\n",
       "      <td>017189e6700ad6cd</td>\n",
       "      <td>https://api.twitter.com/1.1/geo/id/017189e6700...</td>\n",
       "      <td>city</td>\n",
       "      <td>الاحساء</td>\n",
       "      <td>الاحساء, المملكة العربية السعودية</td>\n",
       "      <td>SA</td>\n",
       "      <td>المملكة العربية السعودية</td>\n",
       "      <td>{'type': 'Polygon', 'coordinates': [[[49.41665...</td>\n",
       "      <td>{}</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99997</th>\n",
       "      <td>01fc978d41e183e7</td>\n",
       "      <td>https://api.twitter.com/1.1/geo/id/01fc978d41e...</td>\n",
       "      <td>admin</td>\n",
       "      <td>جازان</td>\n",
       "      <td>جازان, المملكة العربية السعودية</td>\n",
       "      <td>SA</td>\n",
       "      <td>المملكة العربية السعودية</td>\n",
       "      <td>{'type': 'Polygon', 'coordinates': [[[41.75298...</td>\n",
       "      <td>{}</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>99998 rows × 9 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "               place_id                                          place_url  \\\n",
       "0      01bf5c1e56ac186d  https://api.twitter.com/1.1/geo/id/01bf5c1e56a...   \n",
       "1      000799c66e428a87  https://api.twitter.com/1.1/geo/id/000799c66e4...   \n",
       "2      0033b59d59056043  https://api.twitter.com/1.1/geo/id/0033b59d590...   \n",
       "3      b62cd77425868341  https://api.twitter.com/1.1/geo/id/b62cd774258...   \n",
       "4      01609a675eba6f1d  https://api.twitter.com/1.1/geo/id/01609a675eb...   \n",
       "...                 ...                                                ...   \n",
       "99993  e3e9c55876b99760  https://api.twitter.com/1.1/geo/id/e3e9c55876b...   \n",
       "99994  2edb6e240797c549  https://api.twitter.com/1.1/geo/id/2edb6e24079...   \n",
       "99995  001907e868d06e24  https://api.twitter.com/1.1/geo/id/001907e868d...   \n",
       "99996  017189e6700ad6cd  https://api.twitter.com/1.1/geo/id/017189e6700...   \n",
       "99997  01fc978d41e183e7  https://api.twitter.com/1.1/geo/id/01fc978d41e...   \n",
       "\n",
       "      place_place_type     place_name                    place_full_name  \\\n",
       "0                 city         الرياض   الرياض, المملكة العربية السعودية   \n",
       "1                 city         Jeddah    Jeddah, Kingdom of Saudi Arabia   \n",
       "2                admin      Al Rayyan                   Al Rayyan, Qatar   \n",
       "3              country           Iraq                               Iraq   \n",
       "4                 city       Al Surra                   Al Surra, Kuwait   \n",
       "...                ...            ...                                ...   \n",
       "99993          country  مملكة البحرين                      مملكة البحرين   \n",
       "99994          country         Israel                             Israel   \n",
       "99995            admin          Dubai        Dubai, United Arab Emirates   \n",
       "99996             city        الاحساء  الاحساء, المملكة العربية السعودية   \n",
       "99997            admin          جازان    جازان, المملكة العربية السعودية   \n",
       "\n",
       "      place_country_code             place_country  \\\n",
       "0                     SA  المملكة العربية السعودية   \n",
       "1                     SA   Kingdom of Saudi Arabia   \n",
       "2                     QA                     Qatar   \n",
       "3                     IQ                      Iraq   \n",
       "4                     KW                    Kuwait   \n",
       "...                  ...                       ...   \n",
       "99993                 BH             مملكة البحرين   \n",
       "99994                 IL                    Israel   \n",
       "99995                 AE      United Arab Emirates   \n",
       "99996                 SA  المملكة العربية السعودية   \n",
       "99997                 SA  المملكة العربية السعودية   \n",
       "\n",
       "                                      place_bounding_box place_attributes  \n",
       "0      {'type': 'Polygon', 'coordinates': [[[46.30439...               {}  \n",
       "1      {'type': 'Polygon', 'coordinates': [[[38.92965...               {}  \n",
       "2      {'type': 'Polygon', 'coordinates': [[[50.75007...               {}  \n",
       "3      {'type': 'Polygon', 'coordinates': [[[38.79470...               {}  \n",
       "4      {'type': 'Polygon', 'coordinates': [[[47.99377...               {}  \n",
       "...                                                  ...              ...  \n",
       "99993  {'type': 'Polygon', 'coordinates': [[[50.32511...               {}  \n",
       "99994  {'type': 'Polygon', 'coordinates': [[[34.26692...               {}  \n",
       "99995  {'type': 'Polygon', 'coordinates': [[[54.89397...               {}  \n",
       "99996  {'type': 'Polygon', 'coordinates': [[[49.41665...               {}  \n",
       "99997  {'type': 'Polygon', 'coordinates': [[[41.75298...               {}  \n",
       "\n",
       "[99998 rows x 9 columns]"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "places = places.rename(columns = lambda x : 'place_' + str(x))\n",
    "places"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "df = pd.concat([df[:], places[:]], axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>user_id</th>\n",
       "      <th>user_id_str</th>\n",
       "      <th>user_name</th>\n",
       "      <th>user_screen_name</th>\n",
       "      <th>user_location</th>\n",
       "      <th>user_url</th>\n",
       "      <th>user_description</th>\n",
       "      <th>user_translator_type</th>\n",
       "      <th>user_protected</th>\n",
       "      <th>user_verified</th>\n",
       "      <th>...</th>\n",
       "      <th>user_profile_text_color</th>\n",
       "      <th>user_profile_use_background_image</th>\n",
       "      <th>user_profile_image_url</th>\n",
       "      <th>user_profile_image_url_https</th>\n",
       "      <th>user_profile_banner_url</th>\n",
       "      <th>user_default_profile</th>\n",
       "      <th>user_default_profile_image</th>\n",
       "      <th>user_following</th>\n",
       "      <th>user_follow_request_sent</th>\n",
       "      <th>user_notifications</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2473097725</td>\n",
       "      <td>2473097725</td>\n",
       "      <td>عايض صالح بن سمره💙</td>\n",
       "      <td>a_s__alrashidi</td>\n",
       "      <td>🇰🇼🇸🇦</td>\n",
       "      <td>None</td>\n",
       "      <td>-DENTAL STUDENT - لست وحيداً بل الله معي. -♥️٩...</td>\n",
       "      <td>none</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>...</td>\n",
       "      <td>333333</td>\n",
       "      <td>True</td>\n",
       "      <td>http://pbs.twimg.com/profile_images/1301699140...</td>\n",
       "      <td>https://pbs.twimg.com/profile_images/130169914...</td>\n",
       "      <td>https://pbs.twimg.com/profile_banners/24730977...</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>442127734</td>\n",
       "      <td>442127734</td>\n",
       "      <td>Badawi D Kaloti 🇸🇦🇵🇸</td>\n",
       "      <td>BadawiKaloti</td>\n",
       "      <td>jeddah</td>\n",
       "      <td>None</td>\n",
       "      <td>Jeddah KSA , ALAHLI-FC</td>\n",
       "      <td>none</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>...</td>\n",
       "      <td>333333</td>\n",
       "      <td>True</td>\n",
       "      <td>http://pbs.twimg.com/profile_images/1241713944...</td>\n",
       "      <td>https://pbs.twimg.com/profile_images/124171394...</td>\n",
       "      <td>https://pbs.twimg.com/profile_banners/44212773...</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>474134674</td>\n",
       "      <td>474134674</td>\n",
       "      <td>زامل بن سياف الشهراني</td>\n",
       "      <td>Zamel56</td>\n",
       "      <td>الدوحة قطر</td>\n",
       "      <td>None</td>\n",
       "      <td>اللهم ارزقنا القبول وحسن الخاتمة</td>\n",
       "      <td>none</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>...</td>\n",
       "      <td>333333</td>\n",
       "      <td>True</td>\n",
       "      <td>http://pbs.twimg.com/profile_images/8319031312...</td>\n",
       "      <td>https://pbs.twimg.com/profile_images/831903131...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1011036470</td>\n",
       "      <td>1011036470</td>\n",
       "      <td>MJ #RM</td>\n",
       "      <td>SoulTheangel</td>\n",
       "      <td>lraq</td>\n",
       "      <td>None</td>\n",
       "      <td>ليس مهم ان اروق للاخرين بفكري وفعلي المهم ان ا...</td>\n",
       "      <td>none</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>...</td>\n",
       "      <td>333333</td>\n",
       "      <td>True</td>\n",
       "      <td>http://pbs.twimg.com/profile_images/1085510994...</td>\n",
       "      <td>https://pbs.twimg.com/profile_images/108551099...</td>\n",
       "      <td>https://pbs.twimg.com/profile_banners/10110364...</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>236791004</td>\n",
       "      <td>236791004</td>\n",
       "      <td>المستشار/سهى الصالح</td>\n",
       "      <td>suha_alsaleh</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>مستشار بالفتوى والتشريع -مجلس الوزراء</td>\n",
       "      <td>none</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>...</td>\n",
       "      <td>333333</td>\n",
       "      <td>True</td>\n",
       "      <td>http://pbs.twimg.com/profile_images/1310942319...</td>\n",
       "      <td>https://pbs.twimg.com/profile_images/131094231...</td>\n",
       "      <td>https://pbs.twimg.com/profile_banners/23679100...</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99993</th>\n",
       "      <td>898286247868854272</td>\n",
       "      <td>898286247868854272</td>\n",
       "      <td>عبدالله</td>\n",
       "      <td>haikii14</td>\n",
       "      <td>You know how I’m</td>\n",
       "      <td>https://tellonym.me/AlHaiki</td>\n",
       "      <td>🎩</td>\n",
       "      <td>none</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>...</td>\n",
       "      <td>333333</td>\n",
       "      <td>True</td>\n",
       "      <td>http://pbs.twimg.com/profile_images/1310176260...</td>\n",
       "      <td>https://pbs.twimg.com/profile_images/131017626...</td>\n",
       "      <td>https://pbs.twimg.com/profile_banners/89828624...</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99994</th>\n",
       "      <td>183592710</td>\n",
       "      <td>183592710</td>\n",
       "      <td>Talia levin</td>\n",
       "      <td>talialin</td>\n",
       "      <td>Tel Aviv</td>\n",
       "      <td>http://m.maariv.co.il/Author/Talia-Levin</td>\n",
       "      <td>עיתונאית ,מעריב סופהשבוע- journalist, Maariv, ...</td>\n",
       "      <td>none</td>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>...</td>\n",
       "      <td>362720</td>\n",
       "      <td>True</td>\n",
       "      <td>http://pbs.twimg.com/profile_images/1229360892...</td>\n",
       "      <td>https://pbs.twimg.com/profile_images/122936089...</td>\n",
       "      <td>https://pbs.twimg.com/profile_banners/18359271...</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99995</th>\n",
       "      <td>2772234830</td>\n",
       "      <td>2772234830</td>\n",
       "      <td>خ ل ي ف ه ⧗ ا ل ش ح ي</td>\n",
       "      <td>5loxf</td>\n",
       "      <td>دُبَــيّ | Dubai</td>\n",
       "      <td>https://curiouscat.qa/5loxf</td>\n",
       "      <td>Marvel Studios presents Scarlett Johansson, as...</td>\n",
       "      <td>none</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>...</td>\n",
       "      <td>333333</td>\n",
       "      <td>True</td>\n",
       "      <td>http://pbs.twimg.com/profile_images/1239387631...</td>\n",
       "      <td>https://pbs.twimg.com/profile_images/123938763...</td>\n",
       "      <td>https://pbs.twimg.com/profile_banners/27722348...</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99996</th>\n",
       "      <td>1933822058</td>\n",
       "      <td>1933822058</td>\n",
       "      <td>🇸🇦Abdullah AL-Sowail 🇸🇦</td>\n",
       "      <td>bumqdad1991</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>حاصل على #بكالوريوس'لغة عربية'جامعة الملك سعود...</td>\n",
       "      <td>none</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>...</td>\n",
       "      <td>333333</td>\n",
       "      <td>True</td>\n",
       "      <td>http://pbs.twimg.com/profile_images/1310591036...</td>\n",
       "      <td>https://pbs.twimg.com/profile_images/131059103...</td>\n",
       "      <td>https://pbs.twimg.com/profile_banners/19338220...</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99997</th>\n",
       "      <td>739343169976979456</td>\n",
       "      <td>739343169976979456</td>\n",
       "      <td>HASAN</td>\n",
       "      <td>H_2099_H</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>أكره أن أشمت بأحد ، ولكن يعجبني الزمان حين يدو...</td>\n",
       "      <td>none</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>...</td>\n",
       "      <td>333333</td>\n",
       "      <td>True</td>\n",
       "      <td>http://pbs.twimg.com/profile_images/1307694612...</td>\n",
       "      <td>https://pbs.twimg.com/profile_images/130769461...</td>\n",
       "      <td>https://pbs.twimg.com/profile_banners/73934316...</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>99998 rows × 39 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                  user_id         user_id_str                user_name  \\\n",
       "0              2473097725          2473097725       عايض صالح بن سمره💙   \n",
       "1               442127734           442127734     Badawi D Kaloti 🇸🇦🇵🇸   \n",
       "2               474134674           474134674    زامل بن سياف الشهراني   \n",
       "3              1011036470          1011036470                   MJ #RM   \n",
       "4               236791004           236791004      المستشار/سهى الصالح   \n",
       "...                   ...                 ...                      ...   \n",
       "99993  898286247868854272  898286247868854272                  عبدالله   \n",
       "99994           183592710           183592710              Talia levin   \n",
       "99995          2772234830          2772234830    خ ل ي ف ه ⧗ ا ل ش ح ي   \n",
       "99996          1933822058          1933822058  🇸🇦Abdullah AL-Sowail 🇸🇦   \n",
       "99997  739343169976979456  739343169976979456                    HASAN   \n",
       "\n",
       "      user_screen_name     user_location  \\\n",
       "0       a_s__alrashidi              🇰🇼🇸🇦   \n",
       "1         BadawiKaloti           jeddah    \n",
       "2              Zamel56        الدوحة قطر   \n",
       "3         SoulTheangel              lraq   \n",
       "4         suha_alsaleh              None   \n",
       "...                ...               ...   \n",
       "99993         haikii14  You know how I’m   \n",
       "99994         talialin          Tel Aviv   \n",
       "99995            5loxf  دُبَــيّ | Dubai   \n",
       "99996      bumqdad1991              None   \n",
       "99997         H_2099_H              None   \n",
       "\n",
       "                                       user_url  \\\n",
       "0                                          None   \n",
       "1                                          None   \n",
       "2                                          None   \n",
       "3                                          None   \n",
       "4                                          None   \n",
       "...                                         ...   \n",
       "99993               https://tellonym.me/AlHaiki   \n",
       "99994  http://m.maariv.co.il/Author/Talia-Levin   \n",
       "99995               https://curiouscat.qa/5loxf   \n",
       "99996                                      None   \n",
       "99997                                      None   \n",
       "\n",
       "                                        user_description user_translator_type  \\\n",
       "0      -DENTAL STUDENT - لست وحيداً بل الله معي. -♥️٩...                 none   \n",
       "1                                 Jeddah KSA , ALAHLI-FC                 none   \n",
       "2                       اللهم ارزقنا القبول وحسن الخاتمة                 none   \n",
       "3      ليس مهم ان اروق للاخرين بفكري وفعلي المهم ان ا...                 none   \n",
       "4                  مستشار بالفتوى والتشريع -مجلس الوزراء                 none   \n",
       "...                                                  ...                  ...   \n",
       "99993                                                  🎩                 none   \n",
       "99994  עיתונאית ,מעריב סופהשבוע- journalist, Maariv, ...                 none   \n",
       "99995  Marvel Studios presents Scarlett Johansson, as...                 none   \n",
       "99996  حاصل على #بكالوريوس'لغة عربية'جامعة الملك سعود...                 none   \n",
       "99997  أكره أن أشمت بأحد ، ولكن يعجبني الزمان حين يدو...                 none   \n",
       "\n",
       "       user_protected  user_verified  ...  user_profile_text_color  \\\n",
       "0               False          False  ...                   333333   \n",
       "1               False          False  ...                   333333   \n",
       "2               False          False  ...                   333333   \n",
       "3               False          False  ...                   333333   \n",
       "4               False          False  ...                   333333   \n",
       "...               ...            ...  ...                      ...   \n",
       "99993           False          False  ...                   333333   \n",
       "99994           False           True  ...                   362720   \n",
       "99995           False          False  ...                   333333   \n",
       "99996           False          False  ...                   333333   \n",
       "99997           False          False  ...                   333333   \n",
       "\n",
       "       user_profile_use_background_image  \\\n",
       "0                                   True   \n",
       "1                                   True   \n",
       "2                                   True   \n",
       "3                                   True   \n",
       "4                                   True   \n",
       "...                                  ...   \n",
       "99993                               True   \n",
       "99994                               True   \n",
       "99995                               True   \n",
       "99996                               True   \n",
       "99997                               True   \n",
       "\n",
       "                                  user_profile_image_url  \\\n",
       "0      http://pbs.twimg.com/profile_images/1301699140...   \n",
       "1      http://pbs.twimg.com/profile_images/1241713944...   \n",
       "2      http://pbs.twimg.com/profile_images/8319031312...   \n",
       "3      http://pbs.twimg.com/profile_images/1085510994...   \n",
       "4      http://pbs.twimg.com/profile_images/1310942319...   \n",
       "...                                                  ...   \n",
       "99993  http://pbs.twimg.com/profile_images/1310176260...   \n",
       "99994  http://pbs.twimg.com/profile_images/1229360892...   \n",
       "99995  http://pbs.twimg.com/profile_images/1239387631...   \n",
       "99996  http://pbs.twimg.com/profile_images/1310591036...   \n",
       "99997  http://pbs.twimg.com/profile_images/1307694612...   \n",
       "\n",
       "                            user_profile_image_url_https  \\\n",
       "0      https://pbs.twimg.com/profile_images/130169914...   \n",
       "1      https://pbs.twimg.com/profile_images/124171394...   \n",
       "2      https://pbs.twimg.com/profile_images/831903131...   \n",
       "3      https://pbs.twimg.com/profile_images/108551099...   \n",
       "4      https://pbs.twimg.com/profile_images/131094231...   \n",
       "...                                                  ...   \n",
       "99993  https://pbs.twimg.com/profile_images/131017626...   \n",
       "99994  https://pbs.twimg.com/profile_images/122936089...   \n",
       "99995  https://pbs.twimg.com/profile_images/123938763...   \n",
       "99996  https://pbs.twimg.com/profile_images/131059103...   \n",
       "99997  https://pbs.twimg.com/profile_images/130769461...   \n",
       "\n",
       "                                 user_profile_banner_url user_default_profile  \\\n",
       "0      https://pbs.twimg.com/profile_banners/24730977...                 True   \n",
       "1      https://pbs.twimg.com/profile_banners/44212773...                 True   \n",
       "2                                                    NaN                 True   \n",
       "3      https://pbs.twimg.com/profile_banners/10110364...                 True   \n",
       "4      https://pbs.twimg.com/profile_banners/23679100...                 True   \n",
       "...                                                  ...                  ...   \n",
       "99993  https://pbs.twimg.com/profile_banners/89828624...                 True   \n",
       "99994  https://pbs.twimg.com/profile_banners/18359271...                False   \n",
       "99995  https://pbs.twimg.com/profile_banners/27722348...                False   \n",
       "99996  https://pbs.twimg.com/profile_banners/19338220...                 True   \n",
       "99997  https://pbs.twimg.com/profile_banners/73934316...                 True   \n",
       "\n",
       "      user_default_profile_image user_following  user_follow_request_sent  \\\n",
       "0                          False           None                      None   \n",
       "1                          False           None                      None   \n",
       "2                          False           None                      None   \n",
       "3                          False           None                      None   \n",
       "4                          False           None                      None   \n",
       "...                          ...            ...                       ...   \n",
       "99993                      False           None                      None   \n",
       "99994                      False           None                      None   \n",
       "99995                      False           None                      None   \n",
       "99996                      False           None                      None   \n",
       "99997                      False           None                      None   \n",
       "\n",
       "      user_notifications  \n",
       "0                   None  \n",
       "1                   None  \n",
       "2                   None  \n",
       "3                   None  \n",
       "4                   None  \n",
       "...                  ...  \n",
       "99993               None  \n",
       "99994               None  \n",
       "99995               None  \n",
       "99996               None  \n",
       "99997               None  \n",
       "\n",
       "[99998 rows x 39 columns]"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "users = df['user'].apply(pd.Series)\n",
    "users = users.rename(columns = lambda x : 'user_' + str(x))\n",
    "users"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pd.concat([df[:], users[:]], axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>hashtags</th>\n",
       "      <th>urls</th>\n",
       "      <th>user_mentions</th>\n",
       "      <th>symbols</th>\n",
       "      <th>media</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>[{'text': 'الشيخ_صباح_الأحمد_الصباح', 'indices...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>[{'text': 'الشيخ_صباح_الاحمد_الصباح', 'indices...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'id': 1310954760749678597, 'id_str': '131095...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'https://t.co/JvwHH0jCVM', 'expanded_...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'screen_name': 'Rokkaya89', 'name': '34 🏆♍ ر...</td>\n",
       "      <td>[]</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'https://t.co/yY1hYKrWyx', 'expanded_...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99993</th>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99994</th>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'screen_name': 'becktalia', 'name': 'talia b...</td>\n",
       "      <td>[]</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99995</th>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'screen_name': 'i7arth', 'name': 'Hareth ~',...</td>\n",
       "      <td>[]</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99996</th>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'https://t.co/q54vJp9xoY', 'expanded_...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99997</th>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'screen_name': 'maiconroque27', 'name': 'Mai...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'id': 1311239974000394241, 'id_str': '131123...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>99998 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                hashtags  \\\n",
       "0      [{'text': 'الشيخ_صباح_الأحمد_الصباح', 'indices...   \n",
       "1      [{'text': 'الشيخ_صباح_الاحمد_الصباح', 'indices...   \n",
       "2                                                     []   \n",
       "3                                                     []   \n",
       "4                                                     []   \n",
       "...                                                  ...   \n",
       "99993                                                 []   \n",
       "99994                                                 []   \n",
       "99995                                                 []   \n",
       "99996                                                 []   \n",
       "99997                                                 []   \n",
       "\n",
       "                                                    urls  \\\n",
       "0                                                     []   \n",
       "1                                                     []   \n",
       "2      [{'url': 'https://t.co/JvwHH0jCVM', 'expanded_...   \n",
       "3                                                     []   \n",
       "4      [{'url': 'https://t.co/yY1hYKrWyx', 'expanded_...   \n",
       "...                                                  ...   \n",
       "99993                                                 []   \n",
       "99994                                                 []   \n",
       "99995                                                 []   \n",
       "99996  [{'url': 'https://t.co/q54vJp9xoY', 'expanded_...   \n",
       "99997                                                 []   \n",
       "\n",
       "                                           user_mentions symbols  \\\n",
       "0                                                     []      []   \n",
       "1                                                     []      []   \n",
       "2                                                     []      []   \n",
       "3      [{'screen_name': 'Rokkaya89', 'name': '34 🏆♍ ر...      []   \n",
       "4                                                     []      []   \n",
       "...                                                  ...     ...   \n",
       "99993                                                 []      []   \n",
       "99994  [{'screen_name': 'becktalia', 'name': 'talia b...      []   \n",
       "99995  [{'screen_name': 'i7arth', 'name': 'Hareth ~',...      []   \n",
       "99996                                                 []      []   \n",
       "99997  [{'screen_name': 'maiconroque27', 'name': 'Mai...      []   \n",
       "\n",
       "                                                   media  \n",
       "0                                                    NaN  \n",
       "1      [{'id': 1310954760749678597, 'id_str': '131095...  \n",
       "2                                                    NaN  \n",
       "3                                                    NaN  \n",
       "4                                                    NaN  \n",
       "...                                                  ...  \n",
       "99993                                                NaN  \n",
       "99994                                                NaN  \n",
       "99995                                                NaN  \n",
       "99996                                                NaN  \n",
       "99997  [{'id': 1311239974000394241, 'id_str': '131123...  \n",
       "\n",
       "[99998 rows x 5 columns]"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "entities = df['entities'].apply(pd.Series)\n",
    "entities"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>created_at</th>\n",
       "      <th>id</th>\n",
       "      <th>id_str</th>\n",
       "      <th>text</th>\n",
       "      <th>source</th>\n",
       "      <th>truncated</th>\n",
       "      <th>in_reply_to_status_id</th>\n",
       "      <th>in_reply_to_status_id_str</th>\n",
       "      <th>in_reply_to_user_id</th>\n",
       "      <th>in_reply_to_user_id_str</th>\n",
       "      <th>...</th>\n",
       "      <th>user_default_profile</th>\n",
       "      <th>user_default_profile_image</th>\n",
       "      <th>user_following</th>\n",
       "      <th>user_follow_request_sent</th>\n",
       "      <th>user_notifications</th>\n",
       "      <th>hashtags</th>\n",
       "      <th>urls</th>\n",
       "      <th>user_mentions</th>\n",
       "      <th>symbols</th>\n",
       "      <th>media</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Tue Sep 29 14:49:06 +0000 2020</td>\n",
       "      <td>1310954762666487810</td>\n",
       "      <td>1310954762666487810</td>\n",
       "      <td>راح العود اللي خالي من العذاريب \\nاللي يمناه م...</td>\n",
       "      <td>&lt;a href=\"http://twitter.com/download/iphone\" r...</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>...</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>[{'text': 'الشيخ_صباح_الأحمد_الصباح', 'indices...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Tue Sep 29 14:49:07 +0000 2020</td>\n",
       "      <td>1310954767032766465</td>\n",
       "      <td>1310954767032766465</td>\n",
       "      <td>#الشيخ_صباح_الاحمد_الصباح https://t.co/nAF4xDL5a4</td>\n",
       "      <td>&lt;a href=\"http://twitter.com/download/iphone\" r...</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>...</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>[{'text': 'الشيخ_صباح_الاحمد_الصباح', 'indices...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'id': 1310954760749678597, 'id_str': '131095...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Tue Sep 29 14:49:07 +0000 2020</td>\n",
       "      <td>1310954768693628929</td>\n",
       "      <td>1310954768693628929</td>\n",
       "      <td>انا لله وأنا اليه راجعون ، نعزي انفسنا ونعزي ا...</td>\n",
       "      <td>&lt;a href=\"http://twitter.com/download/iphone\" r...</td>\n",
       "      <td>True</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>...</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'https://t.co/JvwHH0jCVM', 'expanded_...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Tue Sep 29 14:49:08 +0000 2020</td>\n",
       "      <td>1310954769255731205</td>\n",
       "      <td>1310954769255731205</td>\n",
       "      <td>@Rokkaya89 عبالك تاتو رباني شبي حظي 😭</td>\n",
       "      <td>&lt;a href=\"http://twitter.com/download/iphone\" r...</td>\n",
       "      <td>False</td>\n",
       "      <td>1.310955e+18</td>\n",
       "      <td>1310954638380761090</td>\n",
       "      <td>2.363014e+09</td>\n",
       "      <td>2363014047</td>\n",
       "      <td>...</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'screen_name': 'Rokkaya89', 'name': '34 🏆♍ ر...</td>\n",
       "      <td>[]</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Tue Sep 29 14:49:07 +0000 2020</td>\n",
       "      <td>1310954769196945413</td>\n",
       "      <td>1310954769196945413</td>\n",
       "      <td>وها قد غابت شمس الكويت , \\nاللهم أجرنا في مصيب...</td>\n",
       "      <td>&lt;a href=\"http://twitter.com/download/iphone\" r...</td>\n",
       "      <td>True</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>...</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'https://t.co/yY1hYKrWyx', 'expanded_...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99993</th>\n",
       "      <td>Wed Sep 30 09:42:57 +0000 2020</td>\n",
       "      <td>1311240107593281536</td>\n",
       "      <td>1311240107593281536</td>\n",
       "      <td>كنت أتساءل \\nلماذا يختار الموت أفضل من فينا؟ \\...</td>\n",
       "      <td>&lt;a href=\"http://twitter.com/download/iphone\" r...</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>...</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99994</th>\n",
       "      <td>Wed Sep 30 09:42:58 +0000 2020</td>\n",
       "      <td>1311240108331470848</td>\n",
       "      <td>1311240108331470848</td>\n",
       "      <td>@becktalia הגזמת</td>\n",
       "      <td>&lt;a href=\"http://twitter.com/download/iphone\" r...</td>\n",
       "      <td>False</td>\n",
       "      <td>1.311240e+18</td>\n",
       "      <td>1311239747797487617</td>\n",
       "      <td>2.701762e+09</td>\n",
       "      <td>2701761817</td>\n",
       "      <td>...</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'screen_name': 'becktalia', 'name': 'talia b...</td>\n",
       "      <td>[]</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99995</th>\n",
       "      <td>Wed Sep 30 09:42:58 +0000 2020</td>\n",
       "      <td>1311240111024148481</td>\n",
       "      <td>1311240111024148481</td>\n",
       "      <td>@i7arth @LxRY_7 @Count__Vampire مسكين خلود ساك...</td>\n",
       "      <td>&lt;a href=\"http://twitter.com/download/iphone\" r...</td>\n",
       "      <td>False</td>\n",
       "      <td>1.311240e+18</td>\n",
       "      <td>1311239939934351360</td>\n",
       "      <td>1.082444e+09</td>\n",
       "      <td>1082444168</td>\n",
       "      <td>...</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'screen_name': 'i7arth', 'name': 'Hareth ~',...</td>\n",
       "      <td>[]</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99996</th>\n",
       "      <td>Wed Sep 30 09:42:59 +0000 2020</td>\n",
       "      <td>1311240113389789184</td>\n",
       "      <td>1311240113389789184</td>\n",
       "      <td>من الطبيعي أن نختلف ونعتذر .. \\nونعاتب ..  \\nو...</td>\n",
       "      <td>&lt;a href=\"http://tapbots.com/tweetbot\" rel=\"nof...</td>\n",
       "      <td>True</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>...</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'https://t.co/q54vJp9xoY', 'expanded_...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99997</th>\n",
       "      <td>Wed Sep 30 09:43:00 +0000 2020</td>\n",
       "      <td>1311240116271222785</td>\n",
       "      <td>1311240116271222785</td>\n",
       "      <td>@maiconroque27 💪🏻 https://t.co/23MmIpb7R2</td>\n",
       "      <td>&lt;a href=\"http://twitter.com/download/iphone\" r...</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>4.144883e+09</td>\n",
       "      <td>4144883333</td>\n",
       "      <td>...</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'screen_name': 'maiconroque27', 'name': 'Mai...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'id': 1311239974000394241, 'id_str': '131123...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>99998 rows × 88 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                           created_at                   id  \\\n",
       "0      Tue Sep 29 14:49:06 +0000 2020  1310954762666487810   \n",
       "1      Tue Sep 29 14:49:07 +0000 2020  1310954767032766465   \n",
       "2      Tue Sep 29 14:49:07 +0000 2020  1310954768693628929   \n",
       "3      Tue Sep 29 14:49:08 +0000 2020  1310954769255731205   \n",
       "4      Tue Sep 29 14:49:07 +0000 2020  1310954769196945413   \n",
       "...                               ...                  ...   \n",
       "99993  Wed Sep 30 09:42:57 +0000 2020  1311240107593281536   \n",
       "99994  Wed Sep 30 09:42:58 +0000 2020  1311240108331470848   \n",
       "99995  Wed Sep 30 09:42:58 +0000 2020  1311240111024148481   \n",
       "99996  Wed Sep 30 09:42:59 +0000 2020  1311240113389789184   \n",
       "99997  Wed Sep 30 09:43:00 +0000 2020  1311240116271222785   \n",
       "\n",
       "                    id_str                                               text  \\\n",
       "0      1310954762666487810  راح العود اللي خالي من العذاريب \\nاللي يمناه م...   \n",
       "1      1310954767032766465  #الشيخ_صباح_الاحمد_الصباح https://t.co/nAF4xDL5a4   \n",
       "2      1310954768693628929  انا لله وأنا اليه راجعون ، نعزي انفسنا ونعزي ا...   \n",
       "3      1310954769255731205              @Rokkaya89 عبالك تاتو رباني شبي حظي 😭   \n",
       "4      1310954769196945413  وها قد غابت شمس الكويت , \\nاللهم أجرنا في مصيب...   \n",
       "...                    ...                                                ...   \n",
       "99993  1311240107593281536  كنت أتساءل \\nلماذا يختار الموت أفضل من فينا؟ \\...   \n",
       "99994  1311240108331470848                                   @becktalia הגזמת   \n",
       "99995  1311240111024148481  @i7arth @LxRY_7 @Count__Vampire مسكين خلود ساك...   \n",
       "99996  1311240113389789184  من الطبيعي أن نختلف ونعتذر .. \\nونعاتب ..  \\nو...   \n",
       "99997  1311240116271222785          @maiconroque27 💪🏻 https://t.co/23MmIpb7R2   \n",
       "\n",
       "                                                  source  truncated  \\\n",
       "0      <a href=\"http://twitter.com/download/iphone\" r...      False   \n",
       "1      <a href=\"http://twitter.com/download/iphone\" r...      False   \n",
       "2      <a href=\"http://twitter.com/download/iphone\" r...       True   \n",
       "3      <a href=\"http://twitter.com/download/iphone\" r...      False   \n",
       "4      <a href=\"http://twitter.com/download/iphone\" r...       True   \n",
       "...                                                  ...        ...   \n",
       "99993  <a href=\"http://twitter.com/download/iphone\" r...      False   \n",
       "99994  <a href=\"http://twitter.com/download/iphone\" r...      False   \n",
       "99995  <a href=\"http://twitter.com/download/iphone\" r...      False   \n",
       "99996  <a href=\"http://tapbots.com/tweetbot\" rel=\"nof...       True   \n",
       "99997  <a href=\"http://twitter.com/download/iphone\" r...      False   \n",
       "\n",
       "       in_reply_to_status_id in_reply_to_status_id_str  in_reply_to_user_id  \\\n",
       "0                        NaN                      None                  NaN   \n",
       "1                        NaN                      None                  NaN   \n",
       "2                        NaN                      None                  NaN   \n",
       "3               1.310955e+18       1310954638380761090         2.363014e+09   \n",
       "4                        NaN                      None                  NaN   \n",
       "...                      ...                       ...                  ...   \n",
       "99993                    NaN                      None                  NaN   \n",
       "99994           1.311240e+18       1311239747797487617         2.701762e+09   \n",
       "99995           1.311240e+18       1311239939934351360         1.082444e+09   \n",
       "99996                    NaN                      None                  NaN   \n",
       "99997                    NaN                      None         4.144883e+09   \n",
       "\n",
       "      in_reply_to_user_id_str  ... user_default_profile  \\\n",
       "0                        None  ...                 True   \n",
       "1                        None  ...                 True   \n",
       "2                        None  ...                 True   \n",
       "3                  2363014047  ...                 True   \n",
       "4                        None  ...                 True   \n",
       "...                       ...  ...                  ...   \n",
       "99993                    None  ...                 True   \n",
       "99994              2701761817  ...                False   \n",
       "99995              1082444168  ...                False   \n",
       "99996                    None  ...                 True   \n",
       "99997              4144883333  ...                 True   \n",
       "\n",
       "      user_default_profile_image user_following user_follow_request_sent  \\\n",
       "0                          False           None                     None   \n",
       "1                          False           None                     None   \n",
       "2                          False           None                     None   \n",
       "3                          False           None                     None   \n",
       "4                          False           None                     None   \n",
       "...                          ...            ...                      ...   \n",
       "99993                      False           None                     None   \n",
       "99994                      False           None                     None   \n",
       "99995                      False           None                     None   \n",
       "99996                      False           None                     None   \n",
       "99997                      False           None                     None   \n",
       "\n",
       "      user_notifications                                           hashtags  \\\n",
       "0                   None  [{'text': 'الشيخ_صباح_الأحمد_الصباح', 'indices...   \n",
       "1                   None  [{'text': 'الشيخ_صباح_الاحمد_الصباح', 'indices...   \n",
       "2                   None                                                 []   \n",
       "3                   None                                                 []   \n",
       "4                   None                                                 []   \n",
       "...                  ...                                                ...   \n",
       "99993               None                                                 []   \n",
       "99994               None                                                 []   \n",
       "99995               None                                                 []   \n",
       "99996               None                                                 []   \n",
       "99997               None                                                 []   \n",
       "\n",
       "                                                    urls  \\\n",
       "0                                                     []   \n",
       "1                                                     []   \n",
       "2      [{'url': 'https://t.co/JvwHH0jCVM', 'expanded_...   \n",
       "3                                                     []   \n",
       "4      [{'url': 'https://t.co/yY1hYKrWyx', 'expanded_...   \n",
       "...                                                  ...   \n",
       "99993                                                 []   \n",
       "99994                                                 []   \n",
       "99995                                                 []   \n",
       "99996  [{'url': 'https://t.co/q54vJp9xoY', 'expanded_...   \n",
       "99997                                                 []   \n",
       "\n",
       "                                           user_mentions  symbols  \\\n",
       "0                                                     []       []   \n",
       "1                                                     []       []   \n",
       "2                                                     []       []   \n",
       "3      [{'screen_name': 'Rokkaya89', 'name': '34 🏆♍ ر...       []   \n",
       "4                                                     []       []   \n",
       "...                                                  ...      ...   \n",
       "99993                                                 []       []   \n",
       "99994  [{'screen_name': 'becktalia', 'name': 'talia b...       []   \n",
       "99995  [{'screen_name': 'i7arth', 'name': 'Hareth ~',...       []   \n",
       "99996                                                 []       []   \n",
       "99997  [{'screen_name': 'maiconroque27', 'name': 'Mai...       []   \n",
       "\n",
       "                                                   media  \n",
       "0                                                    NaN  \n",
       "1      [{'id': 1310954760749678597, 'id_str': '131095...  \n",
       "2                                                    NaN  \n",
       "3                                                    NaN  \n",
       "4                                                    NaN  \n",
       "...                                                  ...  \n",
       "99993                                                NaN  \n",
       "99994                                                NaN  \n",
       "99995                                                NaN  \n",
       "99996                                                NaN  \n",
       "99997  [{'id': 1311239974000394241, 'id_str': '131123...  \n",
       "\n",
       "[99998 rows x 88 columns]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.concat([df[:], entities[:]], axis=1)\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>in_reply_to_status_id</th>\n",
       "      <th>in_reply_to_user_id</th>\n",
       "      <th>quote_count</th>\n",
       "      <th>reply_count</th>\n",
       "      <th>retweet_count</th>\n",
       "      <th>favorite_count</th>\n",
       "      <th>quoted_status_id</th>\n",
       "      <th>user_id</th>\n",
       "      <th>user_followers_count</th>\n",
       "      <th>user_friends_count</th>\n",
       "      <th>user_listed_count</th>\n",
       "      <th>user_favourites_count</th>\n",
       "      <th>user_statuses_count</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>9.999800e+04</td>\n",
       "      <td>4.139800e+04</td>\n",
       "      <td>4.244600e+04</td>\n",
       "      <td>99998.0</td>\n",
       "      <td>99998.0</td>\n",
       "      <td>99998.0</td>\n",
       "      <td>99998.0</td>\n",
       "      <td>8.059000e+03</td>\n",
       "      <td>9.999800e+04</td>\n",
       "      <td>9.999800e+04</td>\n",
       "      <td>9.999800e+04</td>\n",
       "      <td>99998.00000</td>\n",
       "      <td>99998.000000</td>\n",
       "      <td>9.999800e+04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>1.311077e+18</td>\n",
       "      <td>1.309893e+18</td>\n",
       "      <td>5.988137e+17</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.307865e+18</td>\n",
       "      <td>5.115577e+17</td>\n",
       "      <td>4.520709e+03</td>\n",
       "      <td>9.551932e+02</td>\n",
       "      <td>8.52025</td>\n",
       "      <td>14203.524680</td>\n",
       "      <td>2.263636e+04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>8.724601e+13</td>\n",
       "      <td>2.280536e+16</td>\n",
       "      <td>5.588499e+17</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3.448818e+16</td>\n",
       "      <td>5.471012e+17</td>\n",
       "      <td>5.753909e+04</td>\n",
       "      <td>4.400316e+03</td>\n",
       "      <td>59.36276</td>\n",
       "      <td>45347.645056</td>\n",
       "      <td>6.261135e+04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>1.310955e+18</td>\n",
       "      <td>2.501321e+09</td>\n",
       "      <td>1.148900e+04</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2.564665e+17</td>\n",
       "      <td>8.061700e+05</td>\n",
       "      <td>0.000000e+00</td>\n",
       "      <td>0.000000e+00</td>\n",
       "      <td>0.00000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>1.000000e+00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>1.311002e+18</td>\n",
       "      <td>1.310971e+18</td>\n",
       "      <td>8.491756e+08</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.310926e+18</td>\n",
       "      <td>5.964789e+08</td>\n",
       "      <td>1.230000e+02</td>\n",
       "      <td>1.510000e+02</td>\n",
       "      <td>0.00000</td>\n",
       "      <td>365.000000</td>\n",
       "      <td>1.360000e+03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>1.311056e+18</td>\n",
       "      <td>1.311025e+18</td>\n",
       "      <td>7.980967e+17</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.310992e+18</td>\n",
       "      <td>4.006751e+09</td>\n",
       "      <td>4.440000e+02</td>\n",
       "      <td>3.750000e+02</td>\n",
       "      <td>0.00000</td>\n",
       "      <td>1877.000000</td>\n",
       "      <td>6.349000e+03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>1.311158e+18</td>\n",
       "      <td>1.311107e+18</td>\n",
       "      <td>1.161777e+18</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.311060e+18</td>\n",
       "      <td>1.087812e+18</td>\n",
       "      <td>1.416000e+03</td>\n",
       "      <td>8.727500e+02</td>\n",
       "      <td>3.00000</td>\n",
       "      <td>8782.000000</td>\n",
       "      <td>2.070300e+04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>1.311240e+18</td>\n",
       "      <td>1.311240e+18</td>\n",
       "      <td>1.311214e+18</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.311239e+18</td>\n",
       "      <td>1.311222e+18</td>\n",
       "      <td>6.667396e+06</td>\n",
       "      <td>1.093351e+06</td>\n",
       "      <td>8172.00000</td>\n",
       "      <td>743434.000000</td>\n",
       "      <td>1.742455e+06</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                 id  in_reply_to_status_id  in_reply_to_user_id  quote_count  \\\n",
       "count  9.999800e+04           4.139800e+04         4.244600e+04      99998.0   \n",
       "mean   1.311077e+18           1.309893e+18         5.988137e+17          0.0   \n",
       "std    8.724601e+13           2.280536e+16         5.588499e+17          0.0   \n",
       "min    1.310955e+18           2.501321e+09         1.148900e+04          0.0   \n",
       "25%    1.311002e+18           1.310971e+18         8.491756e+08          0.0   \n",
       "50%    1.311056e+18           1.311025e+18         7.980967e+17          0.0   \n",
       "75%    1.311158e+18           1.311107e+18         1.161777e+18          0.0   \n",
       "max    1.311240e+18           1.311240e+18         1.311214e+18          0.0   \n",
       "\n",
       "       reply_count  retweet_count  favorite_count  quoted_status_id  \\\n",
       "count      99998.0        99998.0         99998.0      8.059000e+03   \n",
       "mean           0.0            0.0             0.0      1.307865e+18   \n",
       "std            0.0            0.0             0.0      3.448818e+16   \n",
       "min            0.0            0.0             0.0      2.564665e+17   \n",
       "25%            0.0            0.0             0.0      1.310926e+18   \n",
       "50%            0.0            0.0             0.0      1.310992e+18   \n",
       "75%            0.0            0.0             0.0      1.311060e+18   \n",
       "max            0.0            0.0             0.0      1.311239e+18   \n",
       "\n",
       "            user_id  user_followers_count  user_friends_count  \\\n",
       "count  9.999800e+04          9.999800e+04        9.999800e+04   \n",
       "mean   5.115577e+17          4.520709e+03        9.551932e+02   \n",
       "std    5.471012e+17          5.753909e+04        4.400316e+03   \n",
       "min    8.061700e+05          0.000000e+00        0.000000e+00   \n",
       "25%    5.964789e+08          1.230000e+02        1.510000e+02   \n",
       "50%    4.006751e+09          4.440000e+02        3.750000e+02   \n",
       "75%    1.087812e+18          1.416000e+03        8.727500e+02   \n",
       "max    1.311222e+18          6.667396e+06        1.093351e+06   \n",
       "\n",
       "       user_listed_count  user_favourites_count  user_statuses_count  \n",
       "count        99998.00000           99998.000000         9.999800e+04  \n",
       "mean             8.52025           14203.524680         2.263636e+04  \n",
       "std             59.36276           45347.645056         6.261135e+04  \n",
       "min              0.00000               0.000000         1.000000e+00  \n",
       "25%              0.00000             365.000000         1.360000e+03  \n",
       "50%              0.00000            1877.000000         6.349000e+03  \n",
       "75%              3.00000            8782.000000         2.070300e+04  \n",
       "max           8172.00000          743434.000000         1.742455e+06  "
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "##save to csv\n",
    "df.to_csv(\"data/output/sauditweets.csv\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
